home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crosscountry USA Photo Safari
/
Crosscountry USA Photo Safari.iso
/
Data
/
cc_base
/
pak00_16bit_f.pk3
/
game_setup.gl.p
< prev
next >
Wrap
Text File
|
2003-04-25
|
15KB
|
513 lines
{
ActiveWhileHidden = true;
Hidden = true;
ScriptID = Script {
@loaded {
int count;
resid commodity_data_id;
resid csv_data_id;
csv_data_id = ResByName("CSVData");
commodity_data_id = ResPropGetResID(csv_data_id, "commodity_id");
count = CSVGetRowCount(commodity_data_id) - 7;
if (count < 12) {
ResPropSetInt(GuiChildByName(SELF,"com12"),"Hidden",TRUE);
}
if (count < 10) {
ResPropSetInt(GuiChildByName(SELF,"com10"),"Hidden",TRUE);
}
if (count < 8) {
ResPropSetInt(GuiChildByName(SELF,"com8"),"Hidden",TRUE);
}
if (count < 6) {
ResPropSetInt(GuiChildByName(SELF,"com6"),"Hidden",TRUE);
}
if (count < 4) {
ResPropSetInt(GuiChildByName(SELF,"com4"),"Hidden",TRUE);
}
}
};
ChildID = {
GuiAnimation("plate") {
AnimationID = "anim/guage_gui/guage_window.pcx";
X = 0;
Y = 0;
Width = 480;
Height = 390;
},
GuiAnimation("guages") {
AnimationID = "anim/guage_gui/window/guagy.anm";
X = 0;
Y = 0;
Width = 340;
Height = 360;
},
GuiAnimation("num_player_label") {
X = 190;
Y = 70;
Width = 0;
Height = 0;
FontID = "font/square_black_on_gray_9.tf";
TextID = Mangle(98/*"Number of Players:"*/);
},
GuiButtonGroup("1Player") {
X = 180;
Y = 110;
RadioGroupID = 1;
ScriptID = Script {
@show {
ResParseEvent(SELF,"@activate");
ResPropSetResID(SELF, "ActiveButtonID", GuiChildByName(SELF, "radio_button_selected"));
ResPropSetResID(GuiSiblingByName("2PLayer"), "ActiveButtonID", GuiSiblingByName("2PLayer/radio_button_unselected"));
}
@activate {
ResPropSetInt(ResByName("Game"), "game_num_players", 1 );
ResPropSetInt(GuiSiblingByName("player2_name"),"Hidden",TRUE);
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(99/*"1"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(100/*"1"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("2PLayer") {
X = 210;
Y = 110;
RadioGroupID = 1;
ScriptID = Script {
@activate {
ResPropSetInt(ResByName("Game"), "game_num_players", 2 );
ResPropSetInt(GuiSiblingByName("player2_name"),"Hidden",FALSE);
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(101/*"2"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(102/*"2"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiTextInput("player1_name") {
AnimationID = "gui/square/window/window_text_entry.pcx";
X = 180;
Y = 140;
Width = 120;
Height = 22;
InsertCursorID = "gui/dash/tab/insert_cursor.pcx";
OverwriteCursorID = "gui/dash/tab/overwrite_cursor.pcx";
TextX = -50;
FontID = "font/square_black_on_gray_9.tf";
InputFontID = "font/verdana_9_black.tf";
TextID = Mangle(103/*"Name:"*/);
InputText = 32 : "player 1";
ScriptID = Script {
@mousedown {
if (StrExact(ResPropGetStr(SELF,"InputText"),"player 1")) {
ResPropSetStr(SELF,"InputText","");
}
}
};
},
GuiTextInput("player2_name") {
AnimationID = "gui/square/window/window_text_entry.pcx";
X = 180;
Y = 180;
InsertCursorID = "gui/dash/tab/insert_cursor.pcx";
OverwriteCursorID = "gui/dash/tab/overwrite_cursor.pcx";
Width = 120;
Height = 22;
TextX = -50;
FontID = "font/square_black_on_gray_9.tf";
InputFontID = "font/verdana_9_black.tf";
TextID = Mangle(104/*"Name:"*/);
InputText = 32 : "player 2";
ScriptID = Script {
@mousedown {
if (StrExact(ResPropGetStr(SELF,"InputText"),"player 2")) {
ResPropSetStr(SELF,"InputText","");
}
}
};
},
GuiAnimation("commod_label") {
X = 200;
Y = 230;
Width = 0;
Height = 0;
FontID = "font/square_black_on_gray_9.tf";
TextID = Mangle(105/*"Number of Commodities:"*/);
},
GuiButtonGroup("com2") {
X = 180;
Y = 260;
RadioGroupID = 4;
ScriptID = Script {
@activate {
ResPropSetInt(ResByName("Player1Scenario"), "scenario_commodity_number_of", 2 );
ResPropSetInt(ResByName("Player2Scenario"), "scenario_commodity_number_of", 2 );
}
@loaded {
ResPropSetInt(ResByName("Player1Scenario"), "scenario_commodity_number_of", 2 );
ResPropSetInt(ResByName("Player2Scenario"), "scenario_commodity_number_of", 2 );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(106/*"2"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(107/*"2"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("com4") {
X = 210;
Y = 260;
RadioGroupID = 4;
ScriptID = Script {
@activate {
ResPropSetInt(ResByName("Player1Scenario"), "scenario_commodity_number_of", 4 );
ResPropSetInt(ResByName("Player2Scenario"), "scenario_commodity_number_of", 4 );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(108/*"4"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(109/*"4"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("com6") {
X = 240;
Y = 260;
RadioGroupID = 4;
ScriptID = Script {
@activate {
ResPropSetInt(ResByName("Player1Scenario"), "scenario_commodity_number_of", 6 );
ResPropSetInt(ResByName("Player2Scenario"), "scenario_commodity_number_of", 6 );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(110/*"6"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(111/*"6"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("com8") {
X = 270;
Y = 260;
RadioGroupID = 4;
ScriptID = Script {
@activate {
ResPropSetInt(ResByName("Player1Scenario"), "scenario_commodity_number_of", 8 );
ResPropSetInt(ResByName("Player2Scenario"), "scenario_commodity_number_of", 8 );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(112/*"8"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(113/*"8"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("com10") {
X = 300;
Y = 260;
RadioGroupID = 4;
ScriptID = Script {
@activate {
ResPropSetInt(ResByName("Player1Scenario"), "scenario_commodity_number_of", 10 );
ResPropSetInt(ResByName("Player2Scenario"), "scenario_commodity_number_of", 10 );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(114/*"10"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(115/*"10"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButtonGroup("com12") {
X = 330;
Y = 260;
RadioGroupID = 4;
ScriptID = Script {
@activate {
ResPropSetInt(ResByName("Player1Scenario"), "scenario_commodity_number_of", 12 );
ResPropSetInt(ResByName("Player2Scenario"), "scenario_commodity_number_of", 12 );
}
};
ChildID = {
GuiButton("radio_button_unselected") {
StyleID = "gui/bs/radiounsel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(116/*"12"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
},
GuiButton("radio_button_selected") {
StyleID = "gui/bs/radiosel.gbs";
VerticalAlign = ABOVE;
TextDownOffsetX = 0;
TextDownOffsetY = 0;
VerticalPadding = 4;
TextID = Mangle(117/*"12"*/);
FontID = "font/square_black_on_gray_9.tf";
ScriptID = Script {
@activate {
}
};
}
};
},
GuiButton("main_menu") {
X = 100;
Y = 300;
TextID = Mangle(118/*"Main Menu"*/);
StyleID = "gui/bs/square.gbs";
FontID = "font/square_black_on_gray_9.tf";
Width = 150;
AutoSize = HEIGHT;
ScriptID = Script {
@activate {
resid mc;
mc = ResByName("splash_screen.gl/menu_controller");
ResPropSetResID(mc,"panel_to_display", ResByName("main_menu.gl"));
}
};
},
GuiButton("start_game") {
X = 260;
Y = 300;
TextID = Mangle(119/*"Start Game"*/);
StyleID = "gui/bs/square.gbs";
FontID = "font/square_black_on_gray_9.tf";
Width = 150;
AutoSize = HEIGHT;
ScriptID = Script {
@activate {
resid game_id;
game_id = ResByName("Game");
/* set the current player to player 1 */
ResPropSetResID(game_id, "game_cur_player", ResByName("Player1"));
/* set the players names into the player objects */
ResPropSetStr(ResByName("Player1"), "player_name", ResPropGetStr(GuiSiblingByName("player1_name"),"InputText") );
ResPropSetStr(ResByName("Player2"), "player_name", ResPropGetStr(GuiSiblingByName("player2_name"),"InputText") );
/* init a random scenario */
ResParseEvent(ResByName("common/init_scenario.c4"),"@INIT_SCENARIO");
/* init a game */
ResParseEvent(ResByName("common/init_game.c4"),"@INIT_GAME");
release("floor");
mark("floor");
/* load the loading screen */
ResByName("loader.gl");
/* load the dispatch screen */
/* ResByName("laptop.gl"); done by loader now */
}
};
}
};
}